<?php
defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
	<table class="adminlist">
	<thead>
		<tr>
			<th width="20">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->items ); ?>);" />
			</th>
			<th width="5">
				<?php echo JText::_('ID'); ?>
			</th>
			<th>
				<?php echo JText::_('COMPLAINTS_COMPLAINT_TITLE'); ?>
			</th>
			<th>
				<?php echo JText::_('COMPLAINTS_COMPLAINT_CONTENT'); ?>
			</th>
			<th>
				<?php echo JText::_('COMPLAINTS_USERID'); ?>
			</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td>
		</tr>
	</tfoot>
	<tbody>
		<?php
		$k = 0;
		$i = 0;
		foreach ($this->items as &$row) { 
		$checked = JHTML::_('grid.id', $i, $row->id); 
		$link = JRoute::_('index.php?option=com_complaints&controller=complaint&task=editcomplaint&cid[]='.$row->id); 
		$delete_link = JRoute::_('index.php?option=com_complaints&controller=complaint&task=directDelete&cid[]='.$row->id); ?>
		<tr class="<?php echo 'row'.$k; ?>">
			<td>
				<?php echo $checked; ?>
			</td>
			<td>
				<?php echo $row->id; ?>
			</td>
			<td>
				<?php echo $row->complaint_title; ?>
			</td>
			<td>
				<?php echo $row->complaint_content; ?>
			</td>
			<td>
				<?php echo $row->userid; ?>
			</td>
		</tr>
		<?php $k = 1 - $k; $i++; } ?>
	</tbody>
	</table>
</div>
<input type="hidden" name="option" value="com_complaints" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="complaint" />
<input type="hidden" name="view" value="complaint" />
</form>
